package com.ljq.consumer;

import javax.jms.JMSException;  
import javax.jms.Message;  
import javax.jms.MessageListener;  
import javax.jms.TextMessage;

public class ConsumerListener  implements MessageListener{

	@Override
	public void onMessage(Message message) {
		try {  
//			if(1==1) throw new RuntimeException("new runtimeException 111");
            System.out.println("监听器收到的消息："+((TextMessage)message).getText());  
//            message.acknowledge();
        } catch (JMSException e) {  
            e.printStackTrace();  
        }  
		
	}  
}  
